<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ListEmployeesTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:form styleClass="jsfcrud_list_form">
                <h:panelGroup id="messagePanel" layout="block">
                    <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                </h:panelGroup>
                <h:outputText escape="false" value="#{bundle.ListEmployeesEmpty}" rendered="#{employeesController.items.rowCount == 0}"/>
                <h:panelGroup rendered="#{employeesController.items.rowCount > 0}">
                    <h:outputText value="#{employeesController.pagination.pageFirstItem + 1}..#{employeesController.pagination.pageLastItem + 1}/#{employeesController.pagination.itemsCount}"/>&nbsp;
                    <h:commandLink action="#{employeesController.previous}" value="#{bundle.Previous} #{employeesController.pagination.pageSize}" rendered="#{employeesController.pagination.hasPreviousPage}"/>&nbsp;
                    <h:commandLink action="#{employeesController.next}" value="#{bundle.Next} #{employeesController.pagination.pageSize}" rendered="#{employeesController.pagination.hasNextPage}"/>&nbsp;
                    <h:dataTable first="1" value="#{employeesController.items}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
                        
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListEmployeesTitle_firstName}"/>
                            </f:facet>
                            <h:outputText value="#{item.firstName}"/>
                        </h:column>
                        
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListEmployeesTitle_lastName}"/>
                            </f:facet>
                            <h:outputText value="#{item.lastName}"/>
                        </h:column>
                        
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListEmployeesTitle_businessEmail}"/>
                            </f:facet>
                            <h:outputText value="#{item.businessEmail}"/>
                        </h:column>
                        
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListEmployeesTitle_skype}"/>
                            </f:facet>
                            <h:outputText value="#{item.skype}"/>
                        </h:column>
                        
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListEmployeesTitle_phoneNumber}"/>
                            </f:facet>
                            <h:outputText value="#{item.phoneNumber}"/>
                        </h:column>
                        
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListEmployeesTitle_mobile1}"/>
                            </f:facet>
                            <h:outputText value="#{item.mobile1}"/>
                        </h:column>
                        
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListEmployeesTitle_mobile2}"/>
                            </f:facet>
                            <h:outputText value="#{item.mobile2}"/>
                        </h:column>
                        
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListEmployeesTitle_status}"/>
                            </f:facet>
                            <h:outputText value="#{item.status}"/>
                        </h:column>
                        
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListEmployeesTitle_type}"/>
                            </f:facet>
                            <h:outputText value="#{item.type}"/>
                        </h:column>
                        
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListEmployeesTitle_jobTitle1}"/>
                            </f:facet>
                            <h:outputText value="#{item.jobTitle1.jobTitle}"/>
                        </h:column>
                        
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListEmployeesTitle_jobTitle2}"/>
                            </f:facet>
                            <h:outputText value="#{item.jobTitle2.jobTitle}"/>
                        </h:column>
                        
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="&nbsp;"/>
                            </f:facet>
                            <h:commandLink action="#{employeesController.prepareView}" value="#{bundle.ListEmployeesViewLink}"/>
                            <h:outputText value=" "/>
                            <h:commandLink action="#{employeesController.prepareEdit}" value="#{bundle.ListEmployeesEditLink}"/>
                            <h:outputText value=" "/>
                            <h:commandLink action="#{employeesController.destroy}" value="#{bundle.ListEmployeesDestroyLink}"/>
                            <h:outputText value=" "/>
                            <h:commandLink action="#{employeesController.resetPassword}" value="#{bundle.ResetEmployeesPasswordLink}"/>
                        </h:column>
                    </h:dataTable>
                </h:panelGroup>
                
                <br />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <h:commandButton value="#{bundle.ListEmployeesCreateLink}" type="submit" action="#{employeesController.prepareCreate}"/>
                <h:button value="Search" outcome="searchemployees" />
                <h:button value="#{bundle.ListEmployeesIndexLink}" outcome="/index" />
                </h:form>
        </ui:define>
    </ui:composition>
</html>
